home *** CD-ROM | disk | FTP | other *** search
/ Info-Mac 4 / Info_Mac IV CD-ROM (Pacific HiTech Inc.)(August 1994).iso / Applications / gdbm-1.7.3 / source / gdbmconst.h < prev    next >
Text File  |  1994-05-21  |  2KB  |  61 lines

  1. /* gdbmconst.h - The constants defined for use in gdbm. */
  2.  
  3. /*  This file is part of GDBM, the GNU data base manager, by Philip A. Nelson.
  4.     Copyright (C) 1990, 1991, 1993  Free Software Foundation, Inc.
  5.  
  6.     GDBM is free software; you can redistribute it and/or modify
  7.     it under the terms of the GNU General Public License as published by
  8.     the Free Software Foundation; either version 2, or (at your option)
  9.     any later version.
  10.  
  11.     GDBM is distributed in the hope that it will be useful,
  12.     but WITHOUT ANY WARRANTY; without even the implied warranty of
  13.     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  14.     GNU General Public License for more details.
  15.  
  16.     You should have received a copy of the GNU General Public License
  17.     along with GDBM; see the file COPYING.  If not, write to
  18.     the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
  19.  
  20.     You may contact the author by:
  21.        e-mail:  phil@cs.wwu.edu
  22.       us-mail:  Philip A. Nelson
  23.                 Computer Science Department
  24.                 Western Washington University
  25.                 Bellingham, WA 98226
  26.        
  27. *************************************************************************/
  28.  
  29. /* Start with the constant definitions.  */
  30. #define  TRUE    1
  31. #define  FALSE   0
  32.  
  33. /* Parameters to gdbm_open. */
  34. #define  GDBM_READER  0        /* READERS only. */
  35. #define  GDBM_WRITER  1        /* READERS and WRITERS.  Can not create. */
  36. #define  GDBM_WRCREAT 2        /* If not found, create the db. */
  37. #define  GDBM_NEWDB   3        /* ALWAYS create a new db.  (WRITER) */
  38. #define  GDBM_FAST    16    /* Write fast! => No fsyncs. */
  39.  
  40. /* Parameters to gdbm_store for simple insertion or replacement in the
  41.    case a key to store is already in the database. */
  42. #define  GDBM_INSERT  0        /* Do not overwrite data in the database. */
  43. #define  GDBM_REPLACE 1        /* Replace the old value with the new value. */
  44.  
  45. /* Parameters to gdbm_setopt, specifing the type of operation to perform. */
  46. #define     GDBM_CACHESIZE    1    /* Set the cache size. */
  47. #define  GDBM_FASTMODE    2    /* Turn on or off fast mode. */
  48.  
  49. /* In freeing blocks, we will ignore any blocks smaller (and equal) to
  50.    IGNORE_SIZE number of bytes. */
  51. #define IGNORE_SIZE 4
  52.  
  53. /* The number of key bytes kept in a hash bucket. */
  54. #define SMALL    4
  55.  
  56. /* The number of bucket_avail entries in a hash bucket. */
  57. #define BUCKET_AVAIL 6
  58.  
  59. /* The size of the bucket cache. */
  60. #define DEFAULT_CACHESIZE  100
  61.